/*
 *
 *  Copyright (C) 2009 UMA
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see http://www.gnu.org/licenses/. 
 *
 *  Author : Juan Pablo Mar�n Tobar <jpablomt@uma.es>
 *
 *  Version: 1.0
 */

package com.LibreGeoSocial.App.Perfil;

import java.util.ArrayList;

public class Question {
	
	/*
	 * questions constants state
	 * */
	public static final int INITIAL = 0;
	public static final int RIGTH = 1;
	public static final int ERROR = 2;
	
	
	
	/*
	 * attribute questions
	 * */ 
	private int identifier;
	private int code;
	private String topic;
	private String type;
	private String text;
	private ArrayList<Answer> list_answer;
	
	/*
	 * check server return
	 * */
	private String errorDescription;
	private int status;
	
	
	/*
	 * default constructor
	 * */
	public Question(){
		status = INITIAL;
		list_answer = new ArrayList<Answer>();
	}
	
	public void setErrorDescription(String s){
		errorDescription = s;
	}
	
	public String getErrorDescription(){
		return errorDescription;
	}
	
	public int getStatus(){
		return status;
	}
	
	public void setStatus(int b){
		status = b;
	}
	
	public int getIdentifier() {
		return identifier;
	}

	public String getTopic() {
		return topic;
	}

	public void setIdentifier(int identifier) {
		this.identifier = identifier;
	}

	public void setTopic(String topic) {
		this.topic = topic;
	}

	public void setType(String type) {
		this.type = type;
	}

	public void setText(String statement) {
		this.text = statement;
	}

	public String getType() {
		return type;
	}

	public String getText() {
		return text;
	}
	
	public void addAnswer(Answer a){
		list_answer.add(a);
	}

	public ArrayList<Answer> getList_answer() {
		return list_answer;
	}

	public void setCode(int i) {
		code = i;
	}
	
	public int getCode(){
		return code;
	}

}
